module rm {
	/**
	 * Create by richliu1023
	 * @date 2016-06-06
	 * @email richliu1023@gmail.com
	 * @github https://github.com/RichLiu1023
	 * @description a simple explanation
	 */
	export class HtmlTextUtil {

	}

	export var htmlParser:egret.HtmlTextParser = new egret.HtmlTextParser();

	export function getTextColor( text:string,
								  color16:number,
								  size:number = 12,
								  isBold:boolean = false,
								  isUnLine:boolean = false ):string {
		var txt:string = "<font size=\'" + size + "\' color=\'" + rm.toColorString( color16 ) + "\'>"
			+ text + "</font>";
		if ( isBold ) {
			txt = rm.getBoldText( txt );
		}
		if ( isUnLine ) {
			txt = rm.getUnLineText( txt );
		}
		return txt;
	}

	export function getBoldText( text:string ):string {
		return '<b>' + text + '</b>';
	}

	export function getUnLineText( text:string ):string {
		return '<u>' + text + '</u>';
	}

}